package com.lh.service.impl;

import com.lh.dao.GoodsDao;
import com.lh.entity.Goods;
import com.lh.service.GoodsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * @Author: LuoHang
 * @Date: 2021/2/10 12:27
 * @Description
 */
@Service
public class GoodsServiceImpl implements GoodsService {
    @Autowired
    private GoodsDao goodsDao;

    @Override
    public Goods getGoodsById(Integer id) {
        return goodsDao.getGoodsById(id);
    }

    @Override
    public List<Goods> getGoods(Map<String, Object> map) {
        return goodsDao.getGoods(map);
    }

    @Override
    public int getCount(Map<String, Object> map) {
        return goodsDao.getCount(map);
    }

    @Override
    public int addGoods(Goods goods) {
        return goodsDao.addGoods(goods);
    }

    @Override
    public int updateGoods(Map<String, Object> map) {
        return goodsDao.updateGoods(map);
    }

    @Override
    public int deleteGoodsById(Integer id) {
        return goodsDao.deleteGoodsById(id);
    }

    @Override
    public int downMany(List<Integer> ids) {
        return goodsDao.downMany(ids);
    }

    @Override
    public int upMany(List<Integer> ids) {
        return goodsDao.upMany(ids);
    }

    @Override
    public int deleteGoodsByIds(List<Integer> ids) {
        return goodsDao.deleteGoodsByIds(ids);
    }

    @Override
    public List<Goods> getGoodsByTime(Map<String, Object> map) {
        return goodsDao.getGoodsByTime(map);
    }

    @Override
    public int getGoodsCategoryCount(Integer categoryId) {
        return goodsDao.getGoodsCategoryCount(categoryId);
    }

    @Override
    public Goods getGoodsAdd(Integer userId) {
        return goodsDao.getGoodsAdd(userId);
    }
}
